package com.tem.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tem.common.core.domain.SysSearchPage;
import com.tem.system.entity.SysPermissionEntity;
import com.tem.system.entity.SysRoleDeptEntity;
import com.tem.system.entity.SysRoleEntity;
import com.tem.system.entity.SysRolePermissionEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 系统角色数据接口
 * @author 腾木科技
 * @date 2021/6/2 22:24
 */
public interface SysRoleMapper extends BaseMapper<SysRoleEntity> {

    List<SysPermissionEntity> getMenuListByRoleId(Long id);

    List<Long> listRoleMenuByRoleId(Long id);

    void deleteRoleMenuByIds(@Param("ids") List<Long> ids);

    IPage<SysRoleEntity> pageSearch(@Param("page") Page<SysRoleEntity> page,@Param("request") SysSearchPage request);

    Long selectOperotarRoleByRoleId(long id);

    void deleteBath(@Param("ids") List<Long> ids);

    List<SysRolePermissionEntity> selectRoleMenuList(Long roleId);

    void deleteBathRoleMenu(@Param("ids") List<Long> ids);

    void insertRoleMenu(SysRolePermissionEntity roleMenuEntity);

    List<Long> selectRoleDataScopeList(Long roleId);

    void deleteRoleDataScopeByIds(@Param("ids") List<Long> ids);

    void insertRoleDept(SysRoleDeptEntity roleDeptEntity);

    List<Long> selectRoleDeptList(Long id);
}
